<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
    <head>
        <title>Javascript Client for Appointment System</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="./css/clientstubs.css" type="text/css"/>
        <link rel="stylesheet" href="./css/css_master-all.css" type="text/css"/>
        <!-- JS_DECLARE_START - DO NOT REMOVE-->
        <script type="text/javascript" src="Support.js"></script>
        <script type="text/javascript">
            var base_url = "http://simon.ist.rit.edu:8080/AppointmentSystem/resources/appointmentservice/";
            var mime = "text/plain";
        </script>

    </head>
    <body>
        <div class="outerBorder">
            <div class="header">
                <div id="subheader" class="subheader"></div> <!-- sub-header -->
                <div class="banner"></div>
            </div> <!-- header -->
            <div id="main" class="main">
                <h2>Appointment Service</h2>
                <div id="containerContent"> </div>

                <script type="text/javascript">
                    var url = base_url + "Login?username=app13&password=mypassword";
                    var str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>Login:</h1><p>" + str + "</p>");
					
                    url = base_url + "DoctorName?doctorId=5";
                    str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>DoctorName:</h1><p>" + str + "</p>");

                    url = base_url + "DoctorAppointments?doctorId=5";
                    str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>DoctorAppointments:</h1><p>" + str + "</p>");

                    url = base_url + "PatientName?patientId=2";
                    str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>PatientName:</h1><p>" + str + "</p>");

                    url = base_url + "PatientAppointments?patientId=2";
                    str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>PatientAppointments:</h1><p>" + str + "</p>");

                    url = base_url + "DayAppointments?timeframe=2011-05-17";
                    str = rjsSupport.get(url, "text/plain");
                    document.write( "<h1>Appointments for May 17th, 2011:</h1><p>" + str + "</p>");

                    url = base_url + "ChangeAppointment?appointment=5,2,2011-05-17_5,2,2011-05-17,666";
                    str = rjsSupport.get( url, "text/plain" );
                    document.write( "<h1>Changed an Appointment for May 17th, 2011 to be 666 minutes long:</h1><p>" + str + "</p>" );

                    url = base_url + "AddAppointment?appointment=1,1,2012-12-21,666";
                    str = rjsSupport.get( url, "text/plain" );
                    document.write( "<h1>Added an Appointment for the End of the World:</h1><p>" + str + "</p>" );
                </script>
            </div>
        </div>
    </body>
</html>